<?php
// +----------------------------------------------------------------------
// | 添加配置属性
// +----------------------------------------------------------------------
// | Copyright (c) 2015
// +----------------------------------------------------------------------
// | Author: baiping 125618036@qq.com http://www.webipcode.com
// +----------------------------------------------------------------------
// | 2015-6-29下午2:49:52
// +----------------------------------------------------------------------
?>
<?php $this->load->view('public/header');?>
<?php $this->load->view('public/head');?>

<div class="container-fluid">
	<div class="row">
		<?php $this->load->view('public/sideleft');?>
		<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ">
			<!-- 内容区 -->
			<div class="main-title">
				<h3>
					<?php echo $meta_title;?>
				</h3>
			</div>
			<div class="con">
				<!-- 内容列表 -->
				<form name="creat_form" method="post" action="<?php echo site_url('config/modfiy/'.$info->id)?>">
					<div class="form-group col-md-3">
						<label>配置标识<small class="color_9">(只能使用英文且不能重复)</small></label>
    					<input type="text" class="form-control" id="name" name="name" placeholder="配置标识" value="<?php echo $info->name;?>">
  						<?php echo form_error("name",'<span class="text-danger">','</span>');?>
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>配置标题<small class="color_9">(用于后台显示的配置标题)</small></label>
    					<input type="text" class="form-control" id="title" name="title" placeholder="配置标题" value="<?php echo $info->title;?>">
    					<?php echo form_error("title",'<span class="text-danger">','</span>');?>
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>排序<small class="color_9">(用于分组显示的顺序)</small></label>
    					<input type="text" class="form-control" id="sort" name="sort" placeholder="排序" value="<?php echo $info->sort;?>">
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>配置分组<small class="color_9">(用于分组显示的顺序)</small></label>
    					<select name="group" class="form-control">
    						<?php foreach ($group as $key => $value) {?>
    						<option value="<?php echo $key?>" <?php if($key == $info->group){ echo 'selected';}?> ><?php echo $value ?></option>
    						<?php } ?>
    					</select>
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>配置类型<small class="color_9">(系统会根据不同类型解析配置值)</small></label>
    					<select name="type" class="form-control">
    						<?php foreach ($type as $key => $value) {?>
    						<option value="<?php echo $key?>" <?php if($key == $info->type){ echo 'selected';}?> ><?php echo $value ?></option>
    						<?php } ?>
    					</select>
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>配置值</label>
    					<textarea name="value" class="form-control"><?php echo $info->value?></textarea>
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>配置项<small class="color_9">(如果是枚举型 需要配置该项)</small></label>
    					<textarea name="extra" class="form-control"><?php echo $info->extra?></textarea>
					</div>
					<span class="clearfix"></span>
					<div class="form-group col-md-3">
						<label>配置说明<small class="color_9">(配置详细说明)</small></label>
    					<textarea name="remark" class="form-control"><?php echo $info->remark?></textarea>
					</div>
					<span class="clearfix"></span>
					<div class="form-group">
						<button type="submit" class="btn btn-primary">确认</button>
						<a class="btn btn-success" href="javascript:window.history.go(-1);">返回</a>
					</div>
				</form>	
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
//左侧菜单高亮显示
highlight_subnav( '<?php echo site_url('config/index')?>' );
</script>
<?php $this->load->view('public/footer');?>